import { useSearchParams } from 'react-router-dom';

export function useSearch() {
    const [searchParams] = useSearchParams();
    const id = searchParams.get('id');
    const isEdit = !!id;
    return { id, isEdit };
} 